// dlg.txt

//		mark_quest_dest(zone,x,y,layer,quest);
//		cancel_out_fight(0,short kill_enc);
//		make_outdoor_enc(short x,short y,short which_enc);
//		set_out_fight_field(short which_field);
// 				which_field is 0-20

begintalkscript;

variables;

short this_sec = 49;

begintalknode;
	tag = 1;
	condition = get_sdf(100 + this_sec,1) == 0;
	text1 = "A lot of stagnant water has settled in this expanse of cave. Forests of twisted fungus have grown out of the muck, nourished by the heat and minerals from the thermal vents. The smell of sulfur is replaced by the reek of rot.";
	text2 = "You can see shaggy, creepy animals slinking around the strange growths. They look like rats. They're everywhere. Some are small and shy, but the magic of the cave has made some of them huge and fierce.";
	code =
		sf(100 + this_sec,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(100 + this_sec,2) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(100 + this_sec,3) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(100 + this_sec,4) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(100 + this_sec,5) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(100 + this_sec,6) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(100 + this_sec,7) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(100 + this_sec,8) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(100 + this_sec,9) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(100 + this_sec,10) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(100 + this_sec,11) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(100 + this_sec,12) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "The field is yours. You are surrounded by piles of dead rodents. You clean and sheathe your weapon.";
	text2 = "This cavern is much safer now. Not sanitary, though. It will always be disgusting here.";

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "Now that the miners are dead, you search their camp.";
	text2 = "The sacks are full of rock samples and cracked crystals. Nothing of real value.";
	text3 = "However, the miners have a bunch of coins. You also find a very old piece of stone with a rune etched into it. They must have found it in one of these caves. You take them.";
	code =
		change_coins(43,TRUE);
		reward_give(449);
	break;
	
begintalknode;
	tag = 15;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = gf(149,11) == 0;
	question = "Name";
	text1 = "There is an ancient crypt here, mostly buried by moss and fungus. Gnawed bones litter the ground around it. There are signs of heavy rat activity. Big tracks. Little bodies. Mounds of droppings. It's a horrible place.";
	text2 = "The crypt is crumbling under the piles of decaying fungus, but there is still a little bit of the opening you could squeeze through.";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Explore.";
	text1 = "It is disgusting and horrible, but you work your way into the crypt.";
	text2 = "Inside, you are surprised to find no rats. Nothing living at all. The air is chill, and there is a dark, hostile energy in the air. A light haunting, which scares the rodents off. Nothing to worry about.";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Back away.";
	text1 = "You leave the crypt. It is a very nice thing to have one less disgusting, dangerous place in your life.";
	action = END_TALK;
	
begintalknode;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "Look around.";
	text1 = "You find a lot of smashed coffins. There is rotting fabric and crumbling chunks of ancient bone. No signs of who made this crypt or who is buried here. It's an old place. They might not even be Ro.";
	text2 = "The only things you find of value are some coins and a beautiful crystal about the size of your fist, in one of the coffins. Maybe a cache hidden by some miners. You take them.";
	code =
		sf(149,11,1);
		change_coins(37,TRUE);
		change_crafting(1,0,0,0,0);
	break;
		
begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "Leave.";
	text1 = "You squeeze out of the crypt and into the slimy caves outside.";
	text2 = "There, you find predators waiting for you. The rats weren't in the crypt. When you entered, however, they gathered in numbers, waiting to attack when you emerged.";
	action = END_TALK;
	code =
		make_outdoor_enc(445,220,0);
	break;
		
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "You find a small camp of Rokaj miners. They are gathered around a small firepit. It's too warm down here to need a fire to sleep, but they need the extra heat to roast their fresh lizards.";
	text2 = "They are surrounded by tools and sacks of rocks. Maybe ore, maybe crystals.";
	text3 = "When you get close, they quietly shift around, making room by their fire.";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = gf(149,12) == 0;
	question = "Demand that they give up their goods.";
	text1 = "They quietly stare at each other. They barely seem to have heard you. There is a long awkward silence. Did they even understand your demand?";
	text2 = "And then they produce a wide variety of weapons from the piles of sacks around them. With furious howls, they leap at you!";
	action = END_TALK;
	code =
		set_out_fight_field(8);
	break;
	
begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "Sit with them.";
	text1 = "You sit by the miners. They aren't very talkative. They speak in sentences of three words or less. Probably part of the reason they ended up down here.";
	text2 = "Still, they are friendly, and they don't mind the company. They offer you a roast lizard.";
	text3 = "You sit with the miners again. They are still friendly enough. Again, they offer you a little bit of their freshly cooked lizard.";
	action = SET_TO_1 149 12;
	
begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "Just go.";
	text1 = "They watch as you leave. Then they resume gnawing on their little lizards.";
	action = END_TALK;
	code =
		cancel_out_fight(0,0);
	break;

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "Refuse the food.";
	text1 = "You wave their gift away. They are very offended by this. The thin trickle of conversation soon ceases entirely. Eventually, the awkwardness overwhelms you, and you move on.";
	action = END_TALK;
	code =
		cancel_out_fight(0,0);
	break;

begintalknode;
	state = 41;
	nextstate = 42;
	condition = 1;
	question = "Accept the gift.";
	text1 = "You gnaw on the stringy little lizards, half-cooked and free of salt. It's not an appealing meal. Still, they are happy that you accepted it.";
	text2 = "You sit and stare at the burning peat for a bit.";

begintalknode;
	state = 42;
	nextstate = -1;
	condition = 1;
	question = "Ask about the caves.";
	text1 = "They are nervous about describing the local caves, because that is where their claims are. They haven't explored anywhere else.";
	text2 = "They do suggest that you visit Danva's Outpost, to the southwest. It's a safe refuge for explorers of the underworld.";

begintalknode;
	state = 42;
	nextstate = -1;
	condition = 1;
	question = "Ask about their lives.";
	text1 = "They want to say nothing about who they are or where they are from. Outlaws? Or just private? You aren't sure.";

begintalknode;
	state = 42;
	nextstate = -1;
	condition = 1;
	question = "Ask about rats.";
	text1 = "_Lots of them. Watch out._";

begintalknode;
	state = 42;
	nextstate = -1;
	condition = 1;
	question = "Trade with them.";
	text1 = "They show you the stones in their bags. They don't have anything worth trading for.";

begintalknode;
	state = 42;
	nextstate = -1;
	condition = 1;
	question = "Leave.";
	text1 = "You all nod at each other. Then you depart.";
	action = END_TALK;
	code =
		cancel_out_fight(0,0);
	break;


	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				